package demo.Design.Module.Builder;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/13-10-13-17:09
 * @Description：demo.Design.Module.Builder
 */
public class Worker extends Builder{
    private Product product;

    public Worker(Product product) {
        this.product = product;
    }

    public Worker() {
        product = new Product();
    }

    @Override
    Builder builderA(String msg) {
        product.setBuilderA(msg);
        return this;
    }

    @Override
    Builder builderB(String msg) {
        product.setBuilderA(msg);
        return this;
    }

    @Override
    Builder builderC(String msg) {
        product.setBuilderA(msg);
        return this;
    }

    @Override
    Builder builderD(String msg) {
        product.setBuilderA(msg);
        return this;
    }

    @Override
    Product getProduct() {
        return product;
    }
}
